<?php // Change the css classes to suit your needs    
$imgsrc = base_url() . "images/site/";
$this->load->helper('form');
$attributes = array('class' => '', 'id' => '');
echo form_open(base_url()."index.php/usuarios/salvar", $attributes); ?>

        <?php //echo form_error('id'); ?>
        <input id="id" type="hidden" name="id" maxlength="11" value="<?php echo set_value('id', $id); ?>"  />

<div class="input left">
        <label for="perfil">Perfil <span class="required">*</span></label>
        <?php echo form_error('perfil'); ?>
        
        <?php // Change the values in this array to populate your dropdown as required ?>
        <?php $options = array(
        	''  => 'Selecione um',
        	'a' => 'Administrador',
        	'p' => 'Pesquisador'); 
        ?>
		<?php echo form_dropdown('perfil', $options, set_value('perfil', $perfil))?>
</div> 
              
<div class="input left">
        <label for="subprograma_id">Subprograma <span class="required">*</span></label>
        <?php echo form_error('subprograma_id'); ?>
        
        <?php // Change the values in this array to populate your dropdown as required ?>
        <?php 
        	$options = array('' => 'Selecione um', '0' => 'Todos');
        	foreach ($subprogramas as $subprograma)
        		$options[$subprograma->id] = $subprograma->nome; 
        ?>
        <?php echo form_dropdown('subprograma_id', $options, set_value('subprograma_id', $subprograma_id))?>
</div> 
<div class="clear"></div>
<div class="input left">
        <label for="instituicao_id">Instituicao <span class="required">*</span></label>
        <?php echo form_error('instituicao_id'); ?>
        
        <?php // Change the values in this array to populate your dropdown as required ?>
        <?php 
        	$options = array('' => 'Selecione um');
        	foreach ($instituicoes as $instituicao)
        		$options[$instituicao->id] = $instituicao->nome; 
        ?>
        <?php echo form_dropdown('instituicao_id', $options, set_value('instituicao_id', $instituicao_id))?>
</div>                                             

<div class="input left">
        <label for="nome">Nome <span class="required">*</span></label>
        <?php echo form_error('nome'); ?>
        <input id="nome" type="text" name="nome" maxlength="150" value="<?php echo set_value('nome', $nome) ?>"  />
</div>

<div class="clear"></div>

<div class="input left">
        <label for="descricao">Descrição</label>
        <?php echo form_error('descricao'); ?>
        <textarea name="descricao" cols="60" rows="5" id="descricao" class="textarea large"><?php echo set_value('descricao', $descricao); ?></textarea>
</div>

<div class="clear"></div>

<div class="input left">
        <label for="telefone">Telefone</label>
        <?php echo form_error('telefone'); ?>
        <input id="telefone" type="text" name="telefone" maxlength="14" value="<?php echo set_value('telefone', $telefone); ?>"  />
</div>

<div class="input left">
        <label for="email">Email <span class="required">*</span></label>
        <?php echo form_error('email'); ?>
        <input id="email" type="text" name="email" maxlength="150" value="<?php echo set_value('email', $email); ?>"  />
</div>

<div class="clear"></div>

<div class="input left">
        <label for="senha">Senha <span class="required">*</span></label>
        <?php echo form_error('senha'); ?>
        <input id="senha" type="password" name="senha" maxlength="32" value="<?php echo set_value('senha', $senha); ?>"  />
</div>

<div class="submit_user">
	<input type="image" src="<?php echo $imgsrc; ?>btn_prosseguir.gif" name="Prosseguir" onmouseover="this.src='<?php echo $imgsrc; ?>btn_prosseguir.gif'">  
</div>

<div class="clear"></div>

<?php echo form_close(); ?>
